package cn.jinjimi.app.managers.task;

/**
 * Created by lforxeverc on 2016/10/31.
 */

public interface TaskPool<T extends BaseTask> {
    T pop();

    T push(T task);

    T cancel(T task);

    void cancelAll();

    void addObserver(IPoolChangeObserver l);

    void removeObserver(IPoolChangeObserver l);

    void notifyAll(T task, boolean pushOrPop);
}
